﻿using System;
using System.Collections.Generic;
using System.Text;
using ZLDC.Common.Estate;

namespace ZLDC.Topo.BLL.Estate
{
    public class HousingfavoriteBLL
    {
                                                                                public static string p_housingfavorite_save(int ID, int UserId, string User, int housingId, int dltFlag)
        {
            string outmsg = "";
            int newid = 0;

            using (_Database db = new _Database("estate"))
            {
                ZLDC.DAL.Estate.HousingfavoriteDAL.p_housingfavorite_save(ID, UserId, User, housingId, dltFlag, out outmsg, out newid, db);
            }

            return outmsg;
        }

                                        public static string HousingFavoriteDel(int userid, int housingid)
        {
            string outmsg = "取消收藏失败";
            int newid = 0;

            using (_Database db = new _Database("estate"))
            {
                newid = ZLDC.DAL.Estate.HousingfavoriteDAL.HousingFavoriteDel(userid, housingid, db);
            }

            if (newid > 0)
                outmsg = "取消收藏成功";

            return outmsg;
        }

    }
}
